Functional Programming with Overloading and Higher-Order Polymorphism